package com.example.demoorder.bizservice.feignservice;

import com.alibaba.fastjson.JSONObject;
import com.alispring.cloud.demo.entity.User;
import com.example.demoorder.bizservice.feignservice.fallback.FeignServiceFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * rpc 调用其他实例
 */
@FeignClient(value = "user-server", fallback = FeignServiceFallBack.class)
@Service
public interface FeignService {
    @GetMapping("/user-server/get")
    public JSONObject get();


    @GetMapping("/user-server/api/getUser")
    User getUser();
}
